home *** CD-ROM | disk | FTP | other *** search
/ Champak 114 / Vol 114.iso / games / y2k_tetr.swf / scripts / DefineSprite_42 / frame_1 / DoAction.as
Encoding:
Text File  |  2010-08-12  |  2.1 KB  |  62 lines

  1. result = "nook";
  2. tek_x = getProperty("../figure", _X);
  3. tek_y = getProperty("../figure", _Y);
  4. tek_xm = eval("..:max_x") * "10";
  5. tek_ym = eval("..:max_y") * "10";
  6. tposx = (getProperty("../figure", _X) + getProperty("../figure/k1", _X) - "5") / "10" + "1";
  7. tposy = (getProperty("../figure", _Y) + getProperty("../figure/k1", _Y) - "5") / "10" + "1";
  8. if(int(tposy) < tposy)
  9. {
  10.    tposy = int(tposy) + "1";
  11. }
  12. else
  13. {
  14.    tposy = int(tposy);
  15. }
  16. ttt1 = tposy;
  17. cell1 = eval("..:dim" add tposx add "_" add tposy);
  18. tposx = (getProperty("../figure", _X) + getProperty("../figure/k2", _X) - "5") / "10" + "1";
  19. tposy = (getProperty("../figure", _Y) + getProperty("../figure/k2", _Y) - "5") / "10" + "1";
  20. if(int(tposy) < tposy)
  21. {
  22.    tposy = int(tposy) + "1";
  23. }
  24. else
  25. {
  26.    tposy = int(tposy);
  27. }
  28. cell2 = eval("..:dim" add tposx add "_" add tposy);
  29. tposx = (getProperty("../figure", _X) + getProperty("../figure/k3", _X) - "5") / "10" + "1";
  30. tposy = (getProperty("../figure", _Y) + getProperty("../figure/k3", _Y) - "5") / "10" + "1";
  31. if(int(tposy) < tposy)
  32. {
  33.    tposy = int(tposy) + "1";
  34. }
  35. else
  36. {
  37.    tposy = int(tposy);
  38. }
  39. cell3 = eval("..:dim" add tposx add "_" add tposy);
  40. tposx = (getProperty("../figure", _X) + getProperty("../figure/k4", _X) - "5") / "10" + "1";
  41. tposy = (getProperty("../figure", _Y) + getProperty("../figure/k4", _Y) - "5") / "10" + "1";
  42. if(int(tposy) < tposy)
  43. {
  44.    tposy = int(tposy) + "1";
  45. }
  46. else
  47. {
  48.    tposy = int(tposy);
  49. }
  50. cell4 = eval("..:dim" add tposx add "_" add tposy);
  51. if(tek_x + getProperty("../figure/k1", _X) >= "0" and tek_x + getProperty("../figure/k2", _X) >= "0" and tek_x + getProperty("../figure/k3", _X) >= "0" and tek_x + getProperty("../figure/k4", _X) >= "0" and tek_x + getProperty("../figure/k1", _X) < tek_xm and tek_x + getProperty("../figure/k2", _X) < tek_xm and tek_x + getProperty("../figure/k3", _X) < tek_xm and tek_x + getProperty("../figure/k4", _X) < tek_xm)
  52. {
  53.    if(tek_y + getProperty("../figure", _height) < tek_ym)
  54.    {
  55.       if(cell1 eq "" and cell2 eq "" and cell3 eq "" and cell4 eq "")
  56.       {
  57.          result = "ok";
  58.       }
  59.    }
  60. }
  61. stop();
  62.